POV-Ray : Newsgroups : povray.general : color problem : Re: color problem Server Time
3 Aug 2024 16:18:51 EDT (-0400)
  Re: color problem  
From: Mike Williams
Date: 16 Dec 2003 15:00:43
Message: <8o9H2CApQ23$EwYB@econym.demon.co.uk>
Wasn't it Tom Melly who wrote:
>According to the docs (6.1.5.5), the following should be okay, but I get an
>error...
>
>#declare PigTest = pigment{color <1,1,0> + blue 1}
>
>Any ideas?

But you can do things like

#declare Blue = <0,0,1>;
#declare PigTest = pigment{color <1,1,0> + Blue}


>Assuming I've done something stupid, will the correct syntax allow me to add a
>filter component to a pigment map?
>
>e.g.
>
>#declare MyPig =
>pigment{
>    bozo
>    pigment_map{
>        [0 rgb<1,1,0>]
>        [1 rgb<1,0,1>]
>    }
>}
>
>#declare MyPig2=pigment{MyPig filter 0.5}

You can add a colour to a colour, like 

#declare HalfFilter = <0,0,0,0.5>;
#declare PigTest = pigment{color <1,1,0> + HalfFilter}

But to add a colour to a more complicated pigment, I think you have to
use a more complicated syntax, like:

#declare Clear = rgbf 1;
#declare MyPig2=pigment{
  average pigment_map {
    [1.0 MyPig]
    [1.0 Clear]
}}

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.